package com.weharvest.edu.service;

import com.weharvest.edu.dto.BackstageRoleAndMenuAndPermissionDTO;
import com.weharvest.edu.dto.BackstageRoleDTO;
import com.weharvest.edu.view.BackstageRoleAndMenuAndPermissionOneView;
import com.weharvest.edu.view.BackstageRoleAndMenuAndPermissionView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public interface BackstageRoleService extends BaseService {


    /**
     * 查看当前角色下的所拥有的角色
     *
     * @param dto
     * @return
     */
    public Map<String, Object> findByAll(
            BackstageRoleDTO dto,
            HttpServletRequest request, HttpServletResponse response);

    /**
     * 授权-查询列表
     *
     * @param backstageRoleDTO
     * @return
     */
    public BackstageRoleAndMenuAndPermissionView authorizationByFind(BackstageRoleDTO backstageRoleDTO);


    /**
     * 授权-单个角色查询列表
     *
     * @param backstageRoleDTO
     * @returnne
     */
    public BackstageRoleAndMenuAndPermissionOneView authorizationByFindOne(BackstageRoleDTO backstageRoleDTO);


    /**
     * 授权
     *
     * @param backstageRoleAndMenuAndPermissionDTO
     * @return
     */
    public void authorizationByAdd(BackstageRoleAndMenuAndPermissionDTO
                                           backstageRoleAndMenuAndPermissionDTO);

    /**
     * 修改角色
     *
     * @param backstageRoleDTO
     * @return
     */
    public void modify(BackstageRoleDTO backstageRoleDTO);

    /**
     * 增加角色
     *
     * @param backstageRoleDTO
     * @return
     */
    public void add(BackstageRoleDTO backstageRoleDTO, HttpServletRequest request);

    /**
     * 删除角色
     *
     * @param dto
     * @return
     */
    public void delete(
            BackstageRoleDTO dto,
            HttpServletRequest request, HttpServletResponse response);
}
